The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
First thing that comes to mind is that it's not saving the information to the database. You could check the Lapper error file and see if anything is logged there. This can be found in: bin\default\logs
The filename should end with ERR.log
Please check that logfile and report any errors you see.
Also report the version of Lapper you are running.
You can see this by typing this in the LFS chat: !ver
Yisc[NL]
S3 licensed
The problem is not with LFS but with the latest releases of Lapper, which is the reason I am still running version 7.0.4.10 on my servers.
BassDriver knows about the issue, but it's a difficult one to tackle.
I will see if I can post an adjusted version here, that runs on the latest Lapper version.
Yisc[NL]
S3 licensed
Would it be possible to get the record ID in the output? For example with this code:


<?php 
          $list 
GetListTopgetConfigVarDefaultTopCar ), 0);
          IF ( 
getConfigVarDefaultTopCar ) == "XFG" )
          
THEN
            dumpVar 
$list );
          ENDIF
?>

Which outputs this:


$list[4,"Total"] = 5
$list[4,"DatePb"] = "2021/02/05"
$list[4,"Laps"] = 2
$list[4,"PbBestSplitDiffLast"] = 30180
$list[4,"SplitTime1"] = 114590
$list[4,"CName"] = "XFG"
$list[4,"NickName"] = "^1Yis^7c[^4NL] ^1^s4"
$list[4,"Group"] = ""
$list[4,"SplitTime2"] = 0
$list[4,"TimePb"] = "11:19"
$list[4,"PbLapTime"] = 144770
$list[4,"UserName"] = "yisc[nl]"
$list[4,"PbBestSplitDiff1"] = 41050
$list[4,"PbBestSplitDiff0"] = 45390
$list[4,"PbBestSplitDiff2"] = 0
$list[4,"Pos"] = 5
$list[4,"SplitTime0"] = 72720
$list[4,"ListPb"] = "144770,172800"

But when I look in the DB, I see this:



It would be very useful to have the record ID and use that in other places, so information can be combined.
Pitboard V2.17
Yisc[NL]
S3 licensed
For closed tracks you don't have to set the number of splits.
The Pitboard reads the trackname and then has the number of splits in its code.
For open configs you do need to set the number of splits, otherwise the Pitboard won't know how many splits to display.

Ah, I think I know what the issue is Smile
The latest version I uploaded here (2.13) doesn't work with recent versions of Lapper.
So on my end I am running version 2.16 Beta (for just over 3 years, so I guess it should move into a release now, otherwise I will never happen Big grin)

Here we go with version 2.17

Changelog Pitboard V2.17

-Removed some debug code
-Removed a WHILE-loop from sub 'OnRaceStart_Pitboard' and replaced it with a FOREACH-loop
-Removed a WHILE-loop from sub 'OnQualStart_Pitboard' and replaced it with a FOREACH-loop
-Called the wrong array ('$ply_list' instead of '$ply_list_tmp') in Sub 'OnRaceStart_Pitboard'
-Called the wrong array ('$ply_list' instead of '$ply_list_tmp') in Sub 'OnQualStart_Pitboard'
-Looped through wrong array ('$ply_list_pb_racestart' instead of '$ply_list_pb_qualstart') in Sub 'OnQualStart_Pitboard'
-Used a wrong variable ('$uName' instead of '$uName_pitboard') in the FOREACH-loops

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
I made a registration system for Lapper.
See this: https://www.lfs.net/forum/post/1927566#post1927566
Yisc[NL]
S3 licensed
In the past I made the toptable script, which displays the best time for each car on that track (see screenshot below). Would that be useful as a start for this wish: Time table for best laps done total, car filter to click

Yisc[NL]
S3 licensed
Wow, that is a serious request for help with many wishes. I read it a few times but cannot see the big picture so far, so let me start with a question. Why isn't Lapper not able to record laps that are longer then 10 minutes? Have to admit that I never had to deal with such long laps, but Lapper takes the start of a lap, then takes splits and in the end a total laptime. So I cannot see why it would not allow laps that are above a certain value.
Yisc[NL]
S3 licensed
Thanks for all your efforts and if this is your last one, I hope that someone wants to step up and keep this program being developed.
Yisc[NL]
S3 licensed
No, the delayed command will run when the timer expires, whether the last player finished his lap or not. That's why I said that you need to set the timer to the duration of the qualification and add a couple of minutes to take that very last lap into account (within a reasonable time). You will know the world record for the track+car(s) (take the slowest car when you have multiple ones) and then add like 10% (of course this is just an example and you need to work out those numbers to your situation).
Yisc[NL]
S3 licensed
And you want the countdown to start when the last player finished qualification?
Then you might have to do something with a delayed command that gets started when qualify start.
Let us say that qualify is 10 minutes, so at the start of the qualify you run a delayed command that does something after those 10 minutes.
This might be useful for what you want:

HostDelayedCommand - Set a delayed command on the host rather than a player

Delayed commands are set by seconds, so you could set it at 10 x 60 = 600 seconds and then take into account that a player can finish his lap when qualify time runs out. So maybe at 2 minutes to that delayed account.

I have not really tried the above suggestion, just doing this mostly from memory.
Yisc[NL]
S3 licensed
You need this event to do that:

OnFinish : trigered when a player finish a race or qualification
Yisc[NL]
S3 licensed
You cannot do that with Lapper code, unless you also kept a list of all registered player names in Lapper.
But, you could download DB Browser (SQLite) and run a query to retrieve and change the values.
Yisc[NL]
S3 licensed
I understand the security concerns, but LFS players won't see Lapper executing the HTTP command, so they have no knowlegde to what URL it is sending data. From the other side no data can been seen, when someone would get hold of the URL, as PHP is executed server-side and only displays the outcome on a website (if there is anything to display), so unless someone gets the actual PHP-file, this is pretty safe.
Yisc[NL]
S3 licensed
It's Lapper throwing the error on the HTTP command or when PHP gives information back to Lapper?

It could be because of https (that's a guess) or maybe you need to put the value between single quotes, like this:

http("https://velocitymsports.com/testscript.php?uname='Bass-Driver'");
Yisc[NL]
S3 licensed
Ah, that must have happened at some point then.
As you know I still am on a rather old version of Lapper and that HTTP function is working like a dream there.

You can make the webpage talk back to Lapper, using Lapper commands and make them by echoed by PHP.
As long as the syntax is right for Lapper, it will do what you want it to do.
Yisc[NL]
S3 licensed
I never see my HTTP commands on the console, so that's probably because you have it in a ![cmd] event.
Could you try to go to a SUB from the ![cmd] and put the HTTP command in the SUB?
Yisc[NL]
S3 licensed
I think this can never work:

$uName = http("http://localhost/testscript.php?uname=".$userName);

You put an URL into a variable, while you want to execute the HTTP command.
Try this:


<?php 
CASE "!http":
   
http("http://localhost/testscript.php/?uname=".$userName);
   
globalmsg("Hello: ".$userName);
 BREAK;
?>

Yisc[NL]
S3 licensed
I see you have an error in your http syntax:

This: $uName = http("http://localhost/testscript.php/?uname=".$userName);

Should be: $uName = http("http://localhost/testscript.php?uname=".$userName);
Yisc[NL]
S3 licensed
My PHP script looks like this:


<?php 
### Get data send through LFS Lapper ###
$servername$_GET['servername'];
$race_date$_GET['date'];
$password$_GET['password'];
### End ###

Follow by code to do certain things.
?>

In my Lapper Sub I have this:

http("http://[URL TO WEBSERVER]/test_pwd_lfs.php?servername=".$server_name_schedule."&date=".$date_storage."&password=".$pwd_storage);

I think you cannot run PHP-pages on your local computer, they always have to be on a webserver.
Points system V1.06b
Yisc[NL]
S3 licensed
Changelog Points system V1.06b

-The GlobalButton for fastest lap was still showing a value of 15 instead of 5, corrected that
-Removed ToNum from fastest lap function, as it was causing errors in the Lapper log

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Quote from Bass-Driver :Thx Yisc for the quick fix.

Going to disable that script in the next update.
To avoid the confusion.

As far as I know, that issue is no longer there in the current versions of Lapper.
Like I said, Rack Service uses a very old version of Lapper and that has that script and it's causing trouble.
Yisc[NL]
S3 licensed
Yes, seen it and solved it Smile

Your server hosted at Rack Services I guess.
For an unknown reason they are offering a very old Lapper version (6.0.12) that has the exact issue you described.

Luckily I recently found the solution after a fellow Frenchmen asked about it here at the forum.
Open 'addonsused.lpr' and then changed this line: include( "./guiconfig.lpr");

To: #include( "./guiconfig.lpr");

Save the file and restart Lapper and the problem will be gone.
Points system V1.06
Yisc[NL]
S3 licensed
Changelog Points system V1.06

-Changed points awarded to driver with fastest lap from 15 to 5

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Is the track wrong or should people just learn that you cannot win a race in the first corner, but only lose it?
I strongly believe in the second option.
Yisc[NL]
S3 licensed
Quote from Draggo :I think he talking about this https://www.lfs.net/forum/thread/28815-ISRM-mod-drag-0-5-Beta---Release

If that's the case, it isn't a Lapper script and then I will close this thread.
There is a Lapper version of that as well, see this: https://www.lfs.net/forum/thread/89909-Drag-system
FGED GREDG RDFGDR GSFDG